import Vue from 'vue'
import Router from 'vue-router'

import login from '@/page/login.vue'
import home from '@/page/home.vue'
import about from '@/page/about.vue'
Vue.use(Router)

const routes=[
    {
        path: '/login',
        name: '/login',
        component: login,
        meta: {
            compo: 'loginPage',
        }
    },
    {
        path: '/',
        name: '/home',
        component: home,
        meta: {
            compo: 'homePage',
        }
    },
    {
        path: '/home',
        name: '/home',
        component: home,
        meta: {
            compo: 'homePage',
        }
    },
    {
        path: '/about',
        name: '/about',
        component: about,
        meta: {
            compo: 'aboutPage',
        }
    },
];
Vue.prototype.$routes = routes

const router = new Router({
    mode: 'history',
    base: '',
    routes: routes
})

export default router
